<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE html>
<html>
   <head>
      <title>Aprobaciones</title>
      <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <link rel="shortcut icon" type="image/x-icon" href="${pageContext.request.contextPath}/recursos/images/favicon.ico">
      <meta name="author" content="Moises Canche Tzab - Sybil Integraciones TI">
      <link rel="stylesheet" href="${pageContext.request.contextPath}/recursos/css/generico.css">
      <script type="text/javascript" src="${pageContext.request.contextPath}/recursos/js/generico.js"></script>
      <link rel="stylesheet" href="${pageContext.request.contextPath}/recursos/css/<%="blitzer"%>/jquery-ui-1.10.3.custom.min.css">
      <script type="text/javascript" src="${pageContext.request.contextPath}/recursos/js/jquery-1.9.1.min.js"></script>
      <script type="text/javascript" src="${pageContext.request.contextPath}/recursos/js/jquery-ui-1.10.3.custom.min.js"></script>
      <script type='text/javascript'>
         $.ajaxSetup({cache: false});
         $(document).ready(function() {
            $(".btn_salir").button({
               icons: {primary: "ui-icon-power"}
            }).click(function() {
               window.location.replace("${pageContext.request.contextPath}/salir");
            });
            $(".btn_regresar").button({icons: {primary: "ui-icon-arrowreturnthick-1-w"}});
            $(".btn_guardar").button({icons: {primary: "ui-icon-disk"}});
            $(".btn_agregar").button({icons: {primary: "ui-icon-plusthick"}});
            $(".btn_editar").button({icons: {primary: "ui-icon-pencil"}, text: false});
            $(".btn_inactivar").button({icons: {primary: "ui-icon-cancel"}, text: false});
            $(".btn_copiar").button({icons: {primary: "ui-icon-copy"}, text: false});
            $(".btn_eliminar").button({icons: {primary: "ui-icon-circle-minus"}, text: false});
            $(".btn_complementar").button({icons: {primary: "ui-icon-play"}, text: false});
            $(".btn_pdf").button({icons: {primary: "ui-icon-document"}, text: false});

            $("#menu").menu({position: {at: "left bottom"}});
            $("input[type=text]").focus(function() {
               $(this).select();
            }).blur(function() {
               $(this).val($(this).val().toUpperCase());
            });
            $("textarea").blur(function() {
               $(this).val($(this).val().toUpperCase());
            });
            $(".txt_digito").keyup(function() {
               //$(this).val(formatoDigito($(this).val()));
            }).blur(function() {
               $(this).val(formatoDigito($(this).val()));
            });
            $(".txt_decimal").keyup(function() {
               //$(this).val(formatoFloat( $(this).val() )  );
            }).blur(function() {
               $(this).val(formatoFloat($(this).val()));
            }).attr('size', 14);
         });
         function formatoFloat(valor) {
            valor = valor.replace(/[^\d.-]/g, '');
            if (valor.length <= 0) {
               valor = 0;
            } else {
               //valor = Math.round(valor * 100) / 100;
            }
            return valor;
         }
         function formatoDigito(valor) {
            valor = valor.replace(/\D/g, "");
            if (valor.length <= 0) {
               valor = 0;
            }
            return valor;
         }
      </script>
   </head>
   <body>
      <!--[if lt IE 7]>
      <p class="chromeframe">Esta utilizando un explorador obsoleto. <a href="http://browsehappy.com/">
      Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">
      install Google Chrome Frame</a> to better experience this site.</p>
      <![endif]-->
      <!-- Empieza el layout principal -->
      <div id="pnl_layout">
         <!-- Empieza la cabecera -->
         <div id="pnl_cabecera">
            <table>
               <tr>
                  <td><a href="${pageContext.request.contextPath}/index">
                        <img src="${pageContext.request.contextPath}/recursos/images/logo.png" alt="Logo"/>
                     </a>
                  </td>
                  <td class="formato_numero">
                     Bienvenido! <strong><sec:authentication property="details[nombreUsuario]" scope="page"/></strong> 
                  </td>
                  <td><button type="button" class="btn_salir" title="Cerrar Sesi&oacute;n">Salir</button></td>
               </tr>
            </table>
         </div>
         <!-- Termina la cabecera -->
         <ul id="menu">
            <li><a href="${pageContext.request.contextPath}/index">BANDEJA DE ENTRADA</a></li>
            <li><a href="${pageContext.request.contextPath}/reembolsos">REEMBOLSOS</a></li>
            <li><a href="${pageContext.request.contextPath}/solicitudes/historicos">HIST&Oacute;RICO</a></li>
            <li><a href="${pageContext.request.contextPath}/flujos">FLUJOS</a></li>
            <li>
               <a href="${pageContext.request.contextPath}/catalogos">CAT&Aacute;LOGOS</a>
               <ul>
                  <li><a href="${pageContext.request.contextPath}/catalogos/causas">CAUSAS</a></li>
                  <li><a href="${pageContext.request.contextPath}/catalogos/tipossolicitud">TIPOS COMPROBACION</a></li>
               </ul>
            </li>
         </ul><br/>